"use strict";
// 代理购买 
module.exports = (app) => {
    const { STRING, INTEGER, DATE, ENUM } = app.Sequelize;
    // 配置（重要：一定要配置详细，一定要！！！）
    const AdminDepart = app.model.define("admin_depart", {
        id: {
            type: INTEGER(30).UNSIGNED,
            primaryKey: true,
            autoIncrement: true
        },
        parent: {
            type: INTEGER(30),
            allowNull: false,
            defaultValue: 0,
            comment: '父级id',
        },
        name: {
            type: STRING(100),
            allowNull: false,
            defaultValue: '',
            comment: '名称',
        },
        created_at: DATE,
        updated_at: DATE,
    });
    // 定义关联关系
    // AgentCoupons.associate = function (model) {
    //     AgentCoupons.belongsTo(app.model.Coupons, {
    //          foreignKey: 'coupons_id'
    //     });
    // };
    return AdminDepart;
};
